﻿using System.Collections.Generic;
using Core.Library;

namespace DataObject.Image
{
    public class ImageController
    {
        /***************************************
        = Back End
        -------------------------------------- */
        public static void Image_Create(ImageObject o)
        {
            ImageDAL.Image_Create(o);
        }

        public static void Image_Delete(int imageId)
        {
            ImageDAL.Image_Delete(imageId);
        }

        public static int Image_GetImageCount(int productId)
        {
            return ImageDAL.Image_GetImageCount(productId);
        }

        public static ImageObject Image_GetById(int imageId)
        {
            return ObjectHelper.FillObject<ImageObject>(ImageDAL.Image_GetById(imageId));
        }

        public static List<ImageObject> Image_GetByProductId(int productId)
        {
            return ObjectHelper.FillCollection<ImageObject>(ImageDAL.Image_GetByProductId(productId));
        }
    }
}
